package com.zjy.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zjy.pojo.Department;
import com.zjy.service.DeptService;



@Controller
public class UserController {
	@Autowired
	DeptService deptService;
	
	public DeptService getDeptService() {
		return deptService;
	}

	public void setDeptService(DeptService deptService) {
		this.deptService = deptService;
	}

	@RequestMapping("/hello")
	public String hello() {
		System.out.println("=======hello=======");
		return "success";
	}
	
	@RequestMapping("/insert")
	public String insert() {
		System.out.println("=======insert=======");
		Department dept=new Department();
		dept.setDeptId(16);
		dept.setDeptName("开发");
		int i=deptService.insert(dept);
		System.out.println("i:  "+i);
		return "success";
	}

}
